package zhizhemodi.tech.short_term_bwork;

import java.util.TimeZone;

import javax.annotation.PostConstruct;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
// @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) // 去掉数据源
@MapperScan("zhizhemodi.tech.short_term_bwork.mapper")
@ComponentScan("zhizhemodi.tech")
public class ShortTermBworkApplication {

	public static void main(String[] args) {
		SpringApplication.run(ShortTermBworkApplication.class, args);
	}

	/**
	 * 用于设置系统时区为东八区
	 * 本地不会用到
	 * 但是服务器需要
	 */
	@PostConstruct
	void setDefaultTimezone() {
		TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
	}

}
